package com.joolun.system.service.impl;

import java.util.List;
import com.joolun.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.stereotype.Service;
import com.joolun.system.mapper.ScrmChannelStatisticsDetailsMapper;
import com.joolun.system.domain.ScrmChannelStatisticsDetails;
import com.joolun.system.service.IScrmChannelStatisticsDetailsService;

/**
 * 渠道数据明细Service业务层处理
 * 
 * @author joolun
 * @date 2025-04-07
 */
@Service
public class ScrmChannelStatisticsDetailsServiceImpl extends  ServiceImpl<ScrmChannelStatisticsDetailsMapper, ScrmChannelStatisticsDetails> implements IScrmChannelStatisticsDetailsService
{
    @Autowired
    private ScrmChannelStatisticsDetailsMapper scrmChannelStatisticsDetailsMapper;

    /**
     * 查询渠道数据明细
     * 
     * @param id 渠道数据明细主键
     * @return 渠道数据明细
     */
    @Override
    public ScrmChannelStatisticsDetails selectScrmChannelStatisticsDetailsById(Long id)
    {
        return scrmChannelStatisticsDetailsMapper.selectScrmChannelStatisticsDetailsById(id);
    }

    /**
     * 查询渠道数据明细列表
     * 
     * @param scrmChannelStatisticsDetails 渠道数据明细
     * @return 渠道数据明细
     */
    @Override
    public List<ScrmChannelStatisticsDetails> selectScrmChannelStatisticsDetailsList(ScrmChannelStatisticsDetails scrmChannelStatisticsDetails)
    {
        return scrmChannelStatisticsDetailsMapper.selectScrmChannelStatisticsDetailsList(scrmChannelStatisticsDetails);
    }

    /**
     * 新增渠道数据明细
     * 
     * @param scrmChannelStatisticsDetails 渠道数据明细
     * @return 结果
     */
    @Override
    public int insertScrmChannelStatisticsDetails(ScrmChannelStatisticsDetails scrmChannelStatisticsDetails)
    {
        scrmChannelStatisticsDetails.setCreateTime(DateUtils.getNowDate());
        return scrmChannelStatisticsDetailsMapper.insertScrmChannelStatisticsDetails(scrmChannelStatisticsDetails);
    }

    /**
     * 修改渠道数据明细
     * 
     * @param scrmChannelStatisticsDetails 渠道数据明细
     * @return 结果
     */
    @Override
    public int updateScrmChannelStatisticsDetails(ScrmChannelStatisticsDetails scrmChannelStatisticsDetails)
    {
        scrmChannelStatisticsDetails.setUpdateTime(DateUtils.getNowDate());
        return scrmChannelStatisticsDetailsMapper.updateScrmChannelStatisticsDetails(scrmChannelStatisticsDetails);
    }

    /**
     * 批量删除渠道数据明细
     * 
     * @param ids 需要删除的渠道数据明细主键
     * @return 结果
     */
    @Override
    public int deleteScrmChannelStatisticsDetailsByIds(Long[] ids)
    {
        return scrmChannelStatisticsDetailsMapper.deleteScrmChannelStatisticsDetailsByIds(ids);
    }

    /**
     * 删除渠道数据明细信息
     * 
     * @param id 渠道数据明细主键
     * @return 结果
     */
    @Override
    public int deleteScrmChannelStatisticsDetailsById(Long id)
    {
        return scrmChannelStatisticsDetailsMapper.deleteScrmChannelStatisticsDetailsById(id);
    }
}
